<template>
  <div>
    <div class="im">
      <img
        src="https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg"
        alt=""
      />
    </div>
    <van-grid :border="false" :column-num="2">
      <van-grid-item>
        <van-card
        v-for="item in data"
          class="sp"
          :desc="item.name"
          :title="item.title"
          :thumb="item.url"
        />
      </van-grid-item>
      <van-grid-item>
        <van-card
        v-for="item in data"
          class="sp"
          :desc="item.name"
          :title="item.title"
          :thumb="item.url"
        />
      </van-grid-item>
    </van-grid>
  </div>
</template>

<script setup>
import { ref } from "vue";
import axios from "axios";

let data = ref([]);
let goge=async()=>
{
    let resp=await axios.get('/api/room/list')
    data.value=resp.data.data.list
}

goge()
</script>

<style lang="scss" scoped>
.im img {
  width: 100%;
  height: 200px;
}
.sp {
  width: 170px;
  height: 200px;
}
</style>